<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>aa</h1>
<h1>aa</h1>
<h1>aa</h1>
<h1>aa</h1>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<span style="position: relative"><input type="button" value="0" id="btn1"></span>
<script>
    var btn1 = document.getElementById('btn1');
    btn1.onclick = function(e){//event e evn event
        console.log(e)
    }

    function foo(a){
        console.log(a)
    }
    foo('a')
</script>
</body>
</html>